//
// Created by hp on 2020-01-01.
//

#ifndef THUNDER_GAMEOBJECT_H
#define THUNDER_GAMEOBJECT_H

#include "Game.h"
#include <stb_image.h>

class Gameobject {
public:
    Gameobject();
    Gameobject(vector<string> paths,string expSound,point point1,int w=100,int h=200,int v=10);
    ~Gameobject();

    void loadImage();
    void drawImage(Shader ourShader);
    void move(char dir,GLfloat dt);
    bool pause(GLfloat curTime, float pauTime,Shader ourShader);
    point pos;
    int wid;
    int hei;
    int HP;
    bool have_been_exploded;
    bool explode(float curentTime,Shader ourShader);
    void beingHurt(int harm);
protected:
    vector<string> imagePaths;
    HSTREAM expSound;
    int volocity;
    vector<unsigned int> textures;
    int texID;
    bool is_first;
    GLfloat beginTime;
};


#endif //THUNDER_GAMEOBJECT_H
